<?php
require_once PATH_SITE.'cn/royan/php/utils/writers/AbstractWriter.abstract.php';
require_once PATH_SITE.'cn/royan/php/values/ServerUser.class.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of WriterUser
 *
 * @author yanr
 */
class WriterUserSimple extends AbstractWriter
{
    //put your code here
    function __construct( $user ) {
        $this->object = $user;
    }
    
    public function write()
    {
        $value['type']          = "SimpleUser";
        $value['userid']        = $this->object->__get("databaseId");
        $value['username']      = $this->object->__get("username");
        $value['screenname']    = $this->object->__get("screenname");
        $value['status']        = $this->object->__get("status");
        
        RETURN $value;
        //RETURN json_encode($value);
    }
}

?>
